package com.yf.zzmusic.mapper;

import com.yf.zzmusic.pojo.entity.MusicCollectRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;

/**
 * <p>
 * 歌单记录表，为减少music_collec表的数据的冗余 Mapper 接口
 * </p>
 *
 * @author
 * @since 2024-02-26
 */
public interface MusicCollectRecordMapper extends BaseMapper<MusicCollectRecord> {

  /**
   * 根据music_id删除
   * 当音乐删除时,应执行该操作
   *
   */
  @Delete("delete from music_collect_record where music_id=#{musicId}")
  boolean deleteByMusicId(Integer musicId);

  /**
   * 根据music_collect_id删除
   * @param musicCollectId
   * @return
   */
  @Delete("delete from music_collect_record where music_collect_id=#{musicCollectId}")
  boolean delByMusicCollectId(Integer musicCollectId);
}
